package com.atguigu.c_designed.m3beheviorModel.b8Memento;

import java.util.Stack;

public class CareTakerDraftsBox {

    private final Stack<MementoArticle> stack = new Stack<>();

    public MementoArticle getMemento(){
        MementoArticle mementoArticle = stack.pop();
        return mementoArticle;
    }

    public void addMemento(MementoArticle mementoArticle){
        stack.push(mementoArticle);
    }

}
